Migrate simple try-with-resources use of AgentScope to ContextScope#11763
Migrate simple try-with-resources use of AgentScope to ContextScope#11763mcculls wants to merge 1 commit into
AgentScope to ContextScope#11763Conversation
b881465 to
cfdacad
Compare
cfdacad to
7ababa2
Compare
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (359.528 µs) : 320, 399
. : milestone, 360,
basic (294.424 µs) : 288, 301
. : milestone, 294,
loop (8.987 ms) : 8982, 8991
. : milestone, 8987,
section candidate
noprobe (350.072 µs) : 293, 407
. : milestone, 350,
basic (295.807 µs) : 289, 303
. : milestone, 296,
loop (8.994 ms) : 8988, 9000
. : milestone, 8994,
|
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
There was a problem hiding this comment.
More details
Uniform mechanical refactor across 88 files: every try-with-resources variable declaration changes from AgentScope to ContextScope, which is a valid widening reference conversion because AgentScope extends ContextScope. No method calls on the scope variable are added or removed; all callers (activateSpan, activateManualSpan, continuation.activate()) continue to return AgentScope at runtime, so close() dispatches identically via virtual method invocation. Null-scope safety in Wrapper.java is preserved by the JLS try-with-resources spec.
📊 Validated against 4 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 7ababa2 · What is Autotest? · Any feedback? Reach out in #autotest
daniel-mohedano
left a comment
There was a problem hiding this comment.
LGTM wrt CiVis changes
Motivation
Reduce use of
AgentScopein the codebase - first round of migrationContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]